BaseStatelessReplayLastSubjectAsync class¶
Defined in
Namespace: ReactiveUI.Extensions.Async.Subjects
Assembly: ReactiveUI.Extensions.dll
Full name: ReactiveUI.Extensions.Async.Subjects.BaseStatelessReplayLastSubjectAsync<T>
Modifiers: public abstract
Summary¶
Provides a base class for stateless, asynchronous subjects that replay the last value to new subscribers and support
resuming after errors or completion. Designed for scenarios where observers may join at any time and should receive
the most recent value, if available.
Applies to
net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481
Class hierarchy
classDiagram
class BaseStatelessReplayLastSubjectAsync~T~
class ObservableAsync~T~
ObservableAsync~T~ <|-- BaseStatelessReplayLastSubjectAsync~T~
class ISubjectAsync~T~ {
<>
}
ISubjectAsync~T~ <|.. BaseStatelessReplayLastSubjectAsync~T~
class IObserverAsync~T~ {
<>
}
IObserverAsync~T~ <|.. BaseStatelessReplayLastSubjectAsync~T~
class IAsyncDisposable {
<>
}
IAsyncDisposable <|.. BaseStatelessReplayLastSubjectAsync~T~
class IObservableAsync~T~ {
<>
}
IObservableAsync~T~ <|.. BaseStatelessReplayLastSubjectAsync~T~
Inherits from: ObservableAsync
Implements: ISubjectAsync
Remarks¶
This abstract class implements asynchronous observer and observable patterns, allowing derived classes to define custom notification, error handling, and completion behaviors. It manages observer subscriptions and ensures that the most recent value (if any) is replayed to new subscribers. Thread safety is provided for concurrent access and notification. Typical use cases include event streaming, stateful data flows, or scenarios where late subscribers should receive the latest state.
Constructors¶
| Name | Summary |
|---|---|
| .ctor | Provides a base class for stateless, asynchronous subjects that replay the last value to new subscribers and support resuming after errors or completion. Designed for scenarios where... |
Methods¶
| Name | Summary |
|---|---|
| OnNextAsync | Asynchronously notifies all registered observers of a new value. |
| OnErrorResumeAsync | Handles an error by notifying all observers asynchronously and allows the operation to resume without propagating the exception. |
| OnCompletedAsync | Notifies all observers that the asynchronous operation has completed and performs necessary cleanup. |
| DisposeAsync | Asynchronously releases the unmanaged resources used by the object. |
| SubscribeAsyncCore | Subscribes the specified asynchronous observer to receive notifications from the observable sequence. |
| OnNextAsyncCore | Asynchronously notifies the specified observers of a new value. |
| OnErrorResumeAsyncCore | Handles an error by resuming asynchronous observation for the specified observers. |
| OnCompletedAsyncCore | Invoked to asynchronously notify all observers that the sequence has completed, providing the final result. |